﻿namespace PBIW.Operating
{
    public static class MathExtensions
    {
        public static int ModToPositive(this int left, int right)
        {
            left = ((left % right) + right) % right;
            return left == 0 ? right : left;
        }
        public static long ModToPositive(this long left, long right)
        {
            left = ((left % right) + right) % right;
            return left == 0 ? right : left;
        }
    }
}
